//首页-广告区域-小程序
import type { ResultBanner, ResultCategory, ResultGoodsLike, ResultHot } from '@/types/home'
import type { PageParams, PageResult } from '@/types/global'
import { http } from '@/utils/request'
export const homeBanner = (distributionSite = 1) => {
  return http<ResultBanner[]>({
    url: '/home/banner',
    method: 'GET',
    data: {
      distributionSite
    }
  })
}

//首页-前台分类-小程序
export const homeCategory = () => {
  return http<ResultCategory[]>({
    url: '/home/category/mutli',
    method: 'GET'
  })
}

//首页-热门推荐-小程序
export const homeHot = () => {
  return http<ResultHot[]>({
    url: '/home/hot/mutli',
    method: 'GET'
  })
}

//猜你喜欢-小程序
export const homeGuessLike = (data: PageParams) => {
  return http<PageResult<ResultGoodsLike>>({
    url: '/home/goods/guessLike',
    method: 'GET',
    data
  })
}